package com.myfoon.model.cacheable;

import com.tangosol.io.ExternalizableLite;

import com.tangosol.util.ExternalizableHelper;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class UserSecurityCache implements ExternalizableLite {    
    private Long id;
    private String password;
    
    public UserSecurityCache() {
    }
    
    public UserSecurityCache(Long id, String password) {
        this.id = id;
        this.password = password;
    }

    public void readExternal(DataInput dataInput) throws IOException {
        id = ExternalizableHelper.readLong(dataInput);
        password = ExternalizableHelper.readSafeUTF(dataInput);
    }

    public void writeExternal(DataOutput dataOutput) throws IOException {
        ExternalizableHelper.writeLong(dataOutput, id);
        ExternalizableHelper.writeSafeUTF(dataOutput, password);
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }
}
